﻿@{
    ViewBag.Title = "ScopeWatch";
    Layout = "~/Views/Shared/_Page.cshtml";
}

<h2>Scope Watch</h2>

<div ng-app>
    <form ng-controller="StartUpController">
          Starting: <input ng-model="funding.startingEstimate">
          Recommendation: {{funding.needed}}
    </form>
</div>

<script type="text/javascript">
    function StartUpController($scope) {
        $scope.funding = { startingEstimate: 0 };

        computeNeeded = function() {
            $scope.funding.needed = $scope.funding.startingEstimate * 10;
        };

        $scope.$watch('funding.startingEstimate', computeNeeded);
    }
</script>
